package com.ulic.customerManApplication.journeylovemodule.bo;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.achievementmodule.bo.SubAchievement;
import com.ulic.customerManApplication.membermodule.bo.SubMember;
import com.ulic.customerManApplication.studentmodule.bo.SubStudent;
import com.ulic.customerManApplication.usermodule.bo.User;
@Entity
@Table(name="T_GYW_JOURLOVEACT")
@SequenceGenerator(name="journeyLove_seq",sequenceName="S_GYW_JOURNEYLOVE_ID")
public class JourneyOfLoveActivity implements Serializable{

	/**
	 * 爱心之旅活动
	 */
	private static final long serialVersionUID = 1L;
	private int id;//编号
	private String activityDate;//活动日期
	private String school;//学校
	private Integer donateStuNum;//捐助学生人数
	private Double donateMoney;//捐助金额
	private Integer greenCardMember;//产生的绿卡会员人数
	private Integer silverCardMember;//银卡会员人数
	private Integer goldenCardMember;//金卡会员人数
	private Integer platinumCardMember;//铂金卡会员人数
	private Integer diamondCardMember;//钻石卡会员人数
	private Integer selfDrivings;//自驾车辆数
	private Double activityFee;//活动经费
	
	private User user;//创建者
	
	private String subCompany;//所属分公司
	
	private String subCity;//所属中支
	
	private String subComName;//分公司名称
	
	private String subCityName;//中支名称
	
	private Set<SubMember> subMembers = new HashSet<SubMember>();//爱心之旅产生的会员
	
	private Set<SubStudent> subStuents = new HashSet<SubStudent>();//爱心之旅产生的学生
	
	private Set<SubAchievement> subAchievements = new HashSet<SubAchievement>();//爱心之旅产生的成果
	
	private Date createDate;//创建时间
	
	private String oaSph;//OA审批号
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="journeyLove_seq")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getActivityDate() {
		return activityDate;
	}
	public void setActivityDate(String activityDate) {
		this.activityDate = activityDate;
	}

	public String getSchool() {
		return school;
	}
	public void setSchool(String school) {
		this.school = school;
	}
	public Integer getDonateStuNum() {
		return donateStuNum;
	}
	public void setDonateStuNum(Integer donateStuNum) {
		this.donateStuNum = donateStuNum;
	}
	 
	public Integer getGreenCardMember() {
		return greenCardMember;
	}
	public void setGreenCardMember(Integer greenCardMember) {
		this.greenCardMember = greenCardMember;
	}
	public Integer getSilverCardMember() {
		return silverCardMember;
	}
	public void setSilverCardMember(Integer silverCardMember) {
		this.silverCardMember = silverCardMember;
	}
	public Integer getGoldenCardMember() {
		return goldenCardMember;
	}
	public void setGoldenCardMember(Integer goldenCardMember) {
		this.goldenCardMember = goldenCardMember;
	}
	public Integer getPlatinumCardMember() {
		return platinumCardMember;
	}
	public void setPlatinumCardMember(Integer platinumCardMember) {
		this.platinumCardMember = platinumCardMember;
	}
	public Integer getDiamondCardMember() {
		return diamondCardMember;
	}
	public void setDiamondCardMember(Integer diamondCardMember) {
		this.diamondCardMember = diamondCardMember;
	}
	public Integer getSelfDrivings() {
		return selfDrivings;
	}
	public void setSelfDrivings(Integer selfDrivings) {
		this.selfDrivings = selfDrivings;
	}
	 
	 
	@OneToMany(cascade = { CascadeType.ALL}, fetch = FetchType.LAZY ,targetEntity = SubMember.class,mappedBy="sub_journeyOfLoveActivity")  
	public Set<SubMember> getSubMembers() {
		return subMembers;
	}
	public void setSubMembers(Set<SubMember> subMembers) {
		this.subMembers = subMembers;
	}
	 
	@OneToMany(cascade = { CascadeType.ALL}, fetch = FetchType.LAZY ,targetEntity = SubStudent.class,mappedBy="sub_journeyOfLoveActivity")  
	public Set<SubStudent> getSubStuents() {
		return subStuents;
	}
	public void setSubStuents(Set<SubStudent> subStuents) {
		this.subStuents = subStuents;
	}
	@OneToMany(cascade = { CascadeType.ALL}, fetch = FetchType.LAZY ,targetEntity = SubAchievement.class,mappedBy="sub_journeyOfLoveActivity")  
	public Set<SubAchievement> getSubAchievements() {
		return subAchievements;
	}
	public void setSubAchievements(Set<SubAchievement> subAchievements) {
		this.subAchievements = subAchievements;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Date getCreateDate() {
		return createDate;
	}
	 
	public String getSubCompany() {
		return subCompany;
	}
	public void setSubCompany(String subCompany) {
		this.subCompany = subCompany;
	}
	public String getSubCity() {
		return subCity;
	}
	public void setSubCity(String subCity) {
		this.subCity = subCity;
	}
	public String getSubComName() {
		return subComName;
	}
	public void setSubComName(String subComName) {
		this.subComName = subComName;
	}
	public String getSubCityName() {
		return subCityName;
	}
	public void setSubCityName(String subCityName) {
		this.subCityName = subCityName;
	}
	public Double getDonateMoney() {
		return donateMoney;
	}
	public void setDonateMoney(Double donateMoney) {
		this.donateMoney = donateMoney;
	}
	public Double getActivityFee() {
		return activityFee;
	}
	public void setActivityFee(Double activityFee) {
		this.activityFee = activityFee;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getOaSph() {
		return oaSph;
	}
	public void setOaSph(String oaSph) {
		this.oaSph = oaSph;
	}
    
}
